package com.example.spzx.controller;

import com.example.spzx.Service.OrderInfoService;
import com.example.spzx.model.dto.order.OrderStatisticsDto;
import com.example.spzx.model.vo.common.Result;
import com.example.spzx.model.vo.common.ResultCodeEnum;
import com.example.spzx.model.vo.order.OrderStatisticsVo;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RequestMapping("/admin/order/orderInfo")
@RestController
public class OrderInfoController {
    @Resource
    private OrderInfoService orderInfoService;
    @GetMapping("/getOrderStatisticsData")
    public Result<OrderStatisticsVo> getdate(OrderStatisticsDto orderStatisticsDto){
        OrderStatisticsVo orderStatisticsVo=orderInfoService.getOrderStaticsData(orderStatisticsDto);
        return Result.build(orderStatisticsVo, ResultCodeEnum.SUCCESS);

    }

}
